package com.yunji.cabinet.context.calculate;

import com.yunji.common.base.Triple;
import com.yunji.common.enums.common.ErrorEnum;
import com.yunji.common.utils.bean.BeanUtils;
import org.springframework.util.Assert;

public class CabinetVersionCalculate {

    public static Triple<String,String,String> getTaskCheckParam(String version){
        Assert.isTrue(BeanUtils.isNotNull(version),ErrorEnum.BUSINESS_712012.getText());
        String[] split = version.split("-");
        Assert.isTrue(split.length == 5, ErrorEnum.BUSINESS_712011.getText());
        return new Triple<>(split[2],split[3],split[4]);
    }

}
